#!/usr/bin/env python3.3

from euler import fib
# runs in <1sec

i=0
f=0
s=0
while f<1e6*4:
  i+=1
  f=fib(i)
  if f%2==0:
    s+=f
print(s)
